<script>
import { defineComponent } from 'vue'

export default defineComponent({
  props: {
    list: {
      type: Array,
      default: () => {
        return []
      },
    },
    selected: {
      type: Array,
      default: () => {
        return []
      },
    },
  },
  setup(props, context) {
    return { props, context }
  },
  render() {
    return (
      <a-space
        style={{
          display: 'flex',
          'justify-content': 'space-between',
        }}
      >
        {this.context.slots.default && this.context.slots.default()}
        <div>
          {this.props.list.length > 0 && (
            <span>
              共<b class="red">{this.props.list.length}</b>项
            </span>
          )}
          {this.props.selected.length > 0 && (
            <span>
              　当前选中
              <b class="red">{this.props.selected.length}</b>项
            </span>
          )}
        </div>
      </a-space>
    )
  },
})
</script>
